
<div class="header">
    <div class="header_resize">
      <div class="logo">
        <h1><a href="/">Sample blog</a></h1>
      </div>
      
      <?php 
      if($this->Session->check('Auth.User')){
		$userLogin = $this->Session->read('Auth.User');
	  ?>
	  	<div class="menu_login">
			<ul>
			<li><a href="/adminposts/profile/<?php echo $userLogin['id']; ?>">Hi, <?php echo $userLogin['fullname']; ?></a></li>
			<li><a href="/users/logout">Logout</a></li>
			</ul>
		</div>
	  <?php
	  }else{
      ?>
	      <div class="menu_login">
	        <ul>
	          <li><a href="/users/login">Login</a></li>
	          <li><a href="/users/register">Register</a></li>
	        </ul>
	      </div>
      <?php
      } 
      ?>
      
      <div class="clr"></div>
      <div class="menu_nav" >
        <ul>
          <li class="active"><a href="/">Home</a></li>
          <li><a href="#">About</a></li>
        </ul>
      </div>
          <div style="margin-top: 5px;">
          <form id="formSearchTitle" class="navbar-form navbar-right" role="search"
				action="/search/searchtitle" method="get">
				<div class="form-group">
					<input name="condition" type="text"
						class="form-control" placeholder="Search blog title" value="<?php if(isset($_GET['condition'])) echo $_GET['condition'];?>" required>
				</div>
				
				
				<div class="btn-group">
				  <button type="submit" class="btn btn-default">
					<span class=" glyphicon glyphicon-search"></span>
				  </button>
				  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
				    <span class="caret"></span>
				  </button>
				  <ul class="dropdown-menu" role="menu">
				    <li><a href="/search/searchAdvance">Advance search</a></li>
				  </ul>
				</div>
			</form>
        
        <div class="clr"></div>
    </div>
  </div>
</div>